<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                }
            }
        </script>
        <style type="text/css">
            .input-col-m {
                width: 60px;
            }

            .input-col-l {
                width: 80px;
            }

            .input-col-xxl {
                width: 1%;
                text-align: right;
            }

            .col-95 {
                text-align: right;
            }

            .col-5 {
                text-align: left;
            }
        </style>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <h:form id="form">
                <p:growl id="msgs" showDetail="false"/>
                <p:panel header="对账单发送日志查询">
                    <h:panelGrid columns="2" cellspacing="5" columnClasses="col-95,col-5" width="90%">
                        <h:panelGrid columns="3" cellspacing="5">
                            <h:panelGroup>
                                <h:outputLabel value="起始日期：" style="font-weight: bold"/>
                                <p:inputText required="true"
                                             requiredMessage="起始日期不能为空。"
                                             onclick="WdatePicker({dateFmt:'yyyyMMdd'})"
                                             value="#{rsSendLogAction.startDate}"/>
                            </h:panelGroup>
                            <h:panelGroup>
                                <h:outputLabel value="截止日期：" style="font-weight: bold"/>
                                <p:inputText required="true"
                                             requiredMessage="截止日期不能为空。"
                                             onclick="WdatePicker({dateFmt:'yyyyMMdd'})"
                                             value="#{rsSendLogAction.endDate}"/>
                            </h:panelGroup>
                            <h:panelGroup>
                                <h:outputLabel value="交易结果：" style="font-weight: bold"/>
                                <h:selectOneMenu value="#{rsSendLogAction.txnResult}">
                                    <f:selectItems value="#{rsSendLogAction.txnResultOptions}"/>
                                </h:selectOneMenu>
                            </h:panelGroup>
                        </h:panelGrid>
                        <h:panelGrid columns="1" width="10%">
                            <p:commandButton style="width:90px;" value="查询"
                                             action="#{rsSendLogAction.onQuery}"
                                             update="pdt,msgs">
                            </p:commandButton>
                        </h:panelGrid>
                    </h:panelGrid>
                </p:panel>
                <p:ajaxStatus style="height:18px;text-align:center">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>
                <p:dataTable id="pdt" style="width:100%;"
                             dynamic="true"
                             value="#{rsSendLogAction.sendLogList}" var="record"
                             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             paginator="true" rows="15" paginatorPosition="bottom"
                             rowsPerPageTemplate="100,50,30,15,5"
                             emptyMessage="数据记录为空...">
                    <p:column headerText="操作日期" style="text-align:center">
                        <h:outputText
                                value="#{record.sysDate}"/>
                    </p:column>
                    <p:column headerText="交易运行日期" style="text-align:center">
                        <h:outputText
                                value="#{record.txnDate}">
                        </h:outputText>
                    </p:column>
                    <p:column headerText="交易名称" style="text-align:left">
                        <h:outputText
                                value="#{record.txnNam}"/>
                    </p:column>
                    <p:column headerText="交易码" style="text-align:center">
                        <h:outputText
                                value="#{record.txnCode}"/>
                    </p:column>
                    <p:column headerText="交易结果" style="text-align:center">
                        <h:outputText
                                value="#{rsSendLogAction.sendLogResult.valueOfAlias(record.txnResult).title}"/>
                    </p:column>
                </p:dataTable>
            </h:form>
        </div>
    </ui:define>

</ui:composition>